<%--
  Created by IntelliJ IDEA.
  User: yh570
  Date: 2022/5/6
  Time: 12:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../base.jsp" %>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${basePath}/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="${basePath}/css/public.css" media="all" type="text/css">
    <style>
        body{
            margin: 0 !important;
        }
    </style>
</head>
<body>
<div class="layuimini-container">
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">学生</li>
            <li>教师</li>
            <li>管理员</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show ">
                <iframe id="studentIframe" src="studentList" onload="setIframeHeight('studentIframe')" width="100%" frameborder="0" scrolling="0"></iframe>
            </div>
            <div class="layui-tab-item layui-show  ">
                <iframe id="teacherIframe" src="teacherList" onload="setIframeHeight('teacherIframe')" width="100%" frameborder="0" scrolling="0"></iframe>
            </div>
            <div class="layui-tab-item layui-show ">
                <iframe id="managerIframe" src="managerList" onload="setIframeHeight('managerIframe')" width="100%" frameborder="0" scrolling="0"></iframe>
            </div>
        </div>
    </div>
</div>
<script src="${basePath}/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script>
    function setIframeHeight(_iframe) {
        var iframe =document.getElementById(_iframe);
        iframe.height=580;
        var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
        if (iframeWin.document.body) {
            iframe.height = Math.min(iframeWin.document.documentElement.scrollHeight,iframeWin.document.body.scrollHeight)+60;
            window.scrollTo(0,0);
            return iframe.height;
        }
    };
</script>
</body>
</html>
